//
//  Specific_Name.m
//  Family
//
//  Created by 王声䘵 on 2018/4/20.
//  Copyright © 2018年 王声䘵. All rights reserved.
//

#import "Specific_Name.h"
#define SCREEN_SIZE [UIScreen mainScreen].bounds.size
@interface Specific_Name ()

@end

@implementation Specific_Name

- (void)viewDidLoad {
    [super viewDidLoad];
    NSMutableArray *names = [[NSMutableArray alloc]initWithArray:[[NSUserDefaults standardUserDefaults]valueForKey:@"NAMES"]];
    
    NSString *picName = [[NSString alloc]initWithFormat:@"%@.jpeg",names.lastObject];
    UIImage *image = [UIImage imageNamed:picName];
    UIImageView *imageView = [[UIImageView alloc]initWithImage:image];
    imageView.frame = [UIScreen mainScreen].bounds;
    
    
    
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(back:)];
    [self.view addGestureRecognizer:tap];
    [self.view addSubview:imageView];
    // Do any additional setup after loading the view.
}

- (void)back:(id)tap
{
    [self.navigationController popToRootViewControllerAnimated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
